package Memento;

public class Demo {


    public static void main(String[] args) {
        State state1=new State();
        state1.life=100;
        state1.magic=100;


        Player player1=new Player(state1);
        MementoAdmine mementoAdmine=new MementoAdmine();
        mementoAdmine.setMemento(player1.saveStateToMemento());



        State state2=new State();
        state2.life=80;
        state2.magic=90;
        player1.playerState=state2;
        mementoAdmine.setMemento(player1.saveStateToMemento());

        player1.getStateFromMemento(mementoAdmine.getMemento(0));
        System.out.println(player1.playerState.life);
    }
}
